<?php 
//Array Data
$arrData = $this->arrData;
echo '<pre>';
	print_r($arrData);
echo '</pre>';

//Array Error
$arrError = $this->arrError;

//Title
$title = $this->formText('title',$arrData['title'],array('style'=>'width:406px;'));

//Lead
$lead = $this->formTextarea('lead',$arrData['lead'],array('style'=>'width:400px;','rows'=>4));

//Status
$value_status = 1;
if(isset($arrData['status'])){
	$value_status = $arrData['status'];
}
$status = $this->formHidden('status',$value_status,array('id'=>'status'));

//Link submit
$lnkSubmit = $this->url(array('module'=>'admin','controller'=>'news','action'=>'add'));

//Link Back
$lnkBack = $this->url(array('module'=>'admin','controller'=>'news','action'=>'index'));
?>
<div class="content-box">
			<div class="box-body">
				<div class="box-header clear">
					<h2>Add News</h2>
				</div>
				
				<div class="box-wrap clear">

					<form id="appForm" name="appForm" action="" enctype="multipart/form-data" method="post" class="validate-form form bt-space15">
					
					<div class="columns clear bt-space15">
						<div class="col2-3">
							<!-- Div thong bao loi -->
							<?php if(count($arrError) > 0){
								echo '<div class="notification note-error">
								<a href="#" class="close" title="Close notification">close</a>';
								foreach ($arrError as $key => $val){
							?>
							
								<p><strong><?php echo $key . ': ';?></strong><?php echo $val?></p>
							
							<?php 		
								}
								echo '</div>';
							}?>
							<!-- End div thong bao loi -->
							
							<div class="form-field clear">
								<label for="name" class="form-label size-120 fl-space2">Tiêu đề: <span class="required">*</span></label>
								<?php echo $title;?>
							</div><!-- /.form-field -->
							
							<div class="form-field clear">
								<label for="parent" class="form-label size-120 fl-space2">Mở đầu: <span class="required">*</span></label>
								<?php echo $lead;?>
							</div><!-- /.form-field -->
							
							<div class="form-field clear">
								<label for="parent" class="form-label size-120 fl-space2">Nội dung: </label>
								<?php echo '<div style="margin-left: 140px;">'?>
								<?php echo $this->cmsCk('content',$arrData['content'],array('width'=>800,'height'=>700));
									  //echo $this->cmsFck('content',$arrData['content'],array('width'=>800,'height'=>700));
								?>
								<?php echo  '</div>';?>
							</div><!-- /.form-field -->
							
							<div class="form-field clear">
								<label for="status" class="form-label size-120 fl-space2">Status:</label>
								<div id="radio"><?php echo $status;?></div>
								<span class="switch-wrapper small">									
									<span class="switch-enable <?php if($value_status == 1) echo 'selected';?>">Enable</span>
									<span class="switch-disable <?php if($value_status == 0) echo 'selected';?>">Disable</span>
								</span>								
							</div><!-- /.form-field -->							
                                                        							
							
							</br><button class="green" type="button" onclick="onSubmitForm('appForm','<?php echo $lnkSubmit;?>')">Đồng ý</button>
							<button class="red" type="button" onclick="toSite('<?php echo $lnkBack;?>')">Back</button>	
						</div>
																														
					
					</form>
					
					</div><!-- end of box-wrap -->
			</div> <!-- end of box-body -->
</div>